﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL.Classes;
using DAL;

namespace Business.Classes
{
    public class TagBusiness
    {
        TagDAL tagDAL = new TagDAL();

        public List<Tag> getAllTags()
        {
            try
            {
                return tagDAL.getAllTags();
            }
            catch (Exception)
            {
                
                throw;
            }
        }

        public Tag getTagByID(int id)
        {
            try
            {
                return tagDAL.getTagByID(id);
            }
            catch (Exception)
            {
                
                throw;
            }
        }

        public List<Tag> getTagsByPostNew(PostNew postNew)
        {
            try
            {
                return tagDAL.getTagsByPostNew(postNew);
            }
            catch (Exception)
            {
                
                throw;
            }
        }

        public void insertTag(Tag tag)
        {
            try
            {
                tagDAL.insertTag(tag);
            }
            catch (Exception)
            {
                
                throw;
            }
        }
    }
}
